package generalpattern.diagram.edit.policies;

import generalpattern.diagram.edit.commands.Component2CreateCommand;
import generalpattern.diagram.edit.commands.Connector3CreateCommand;
import generalpattern.diagram.edit.commands.MultiplicityCreateCommand;
import generalpattern.diagram.edit.commands.OverlappingCreateCommand;
import generalpattern.diagram.edit.commands.Pattern3CreateCommand;
import generalpattern.diagram.edit.commands.RoleCreateCommand;
import generalpattern.diagram.edit.commands.StringingCreateCommand;
import generalpattern.diagram.providers.GeneralPatternMetamodelElementTypes;

import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

/**
 * @generated
 */
public class PatternPatternCompartmentItemSemanticEditPolicy extends
		GeneralPatternMetamodelBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public PatternPatternCompartmentItemSemanticEditPolicy() {
		super(GeneralPatternMetamodelElementTypes.Pattern_2022);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (GeneralPatternMetamodelElementTypes.Role_3023 == req
				.getElementType()) {
			return getGEFWrapper(new RoleCreateCommand(req));
		}
		if (GeneralPatternMetamodelElementTypes.Component_3025 == req
				.getElementType()) {
			return getGEFWrapper(new Component2CreateCommand(req));
		}
		if (GeneralPatternMetamodelElementTypes.Connector_3031 == req
				.getElementType()) {
			return getGEFWrapper(new Connector3CreateCommand(req));
		}
		if (GeneralPatternMetamodelElementTypes.Pattern_3032 == req
				.getElementType()) {
			return getGEFWrapper(new Pattern3CreateCommand(req));
		}
		if (GeneralPatternMetamodelElementTypes.Multiplicity_3033 == req
				.getElementType()) {
			return getGEFWrapper(new MultiplicityCreateCommand(req));
		}
		if (GeneralPatternMetamodelElementTypes.Overlapping_3034 == req
				.getElementType()) {
			return getGEFWrapper(new OverlappingCreateCommand(req));
		}
		if (GeneralPatternMetamodelElementTypes.Stringing_3035 == req
				.getElementType()) {
			return getGEFWrapper(new StringingCreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
